package com.fecean.aabbc.netty.client;

import com.fecean.aabbc.netty.client.prod7.NettyClientStarter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ComponentScan;

/**
 * NettyClientApplicationStarter
 *
 * @author: chenfenghai
 * @version: 1.0
 * @date: 2020-02-24 10:03
 * @blame Team
 */
@ComponentScan("com.fecean.aabbc.netty")
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
public class NettyClientApplicationStarter {

    public static void main(String[] args) {
        ApplicationContext context = SpringApplication.run(NettyClientApplicationStarter.class, args);
        // 启动netty客户端
        // context.getBean(NettyClient.class).start();
        // context.getBean(NettyClientConnector.class).start();
        context.getBean(NettyClientStarter.class).connect();
    }
}
